You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > TOpenCLKernel Class > TOpenCLKernel Methods > Enqueue Method > TOpenCLKernel.Enqueue Method ([In] TOpenCLCommandQueue, int, bool)
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
TOpenCLKernel.Enqueue Method ([In] TOpenCLCommandQueue, int, bool)

Submits the Kernel to cmdQueue for computation with specified WorkSize.

Syntax
C#
Visual Basic
public void Enqueue([In] TOpenCLCommandQueue CmdQueue, int WorkSize, bool CPUAdjust);

Setting CPUAdjust to true will reduce WorkSize by factor OPENCL_BLOCKLEN and assume presence of kernel internal for-loops. Kernel internal for-loops can significantly speed up execution of the kernel on CPU devices lowering the function call overhead. The CPUAdjust parameter is used only if the device is of CPU type. The for-loop pattern expected inside the kernel looks like this:

size_t i = get_global_id(0); size_t tIdx = i*BLOCK_LEN; size_t tIdxLen = tIdx + BLOCK_LEN; if (tIdxLen > Length) tIdxLen = Length; for (i = tIdx; i < tIdxLen; i++) { }

 

where BLOCK_LEN matches OPENCL_BLOCKLEN.

Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!